/*
 * Copyright (C) 2017 Zhejiang BYCDAO Technology CO.,LTD.
 * All rights reserved.
 * Official Web Site: http://www.bycdao.com.
 * Developer Web Site: http://open.bycdao.com.
 */

package com.myjava.lift;

import com.xiaoleilu.hutool.util.StrUtil;

import java.util.concurrent.ConcurrentHashMap;

/***
 * 数据缓存实例
 */
public class CacheInstance {

    private ConcurrentHashMap<String, Object> props = new ConcurrentHashMap<>();


    public Object get(String key) {
        if (props.containsKey(key)) {
            return props.get(key);
        }
        return null;
    }

    public void put(String key, Object value) {
        if (value != null) {
            if (StrUtil.isNotEmpty(key)) {
                props.put(key, value);
            }
        }
    }
}
